home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
redakcyjne
/
programy
/
PSPad editor 4.5.4 build 2356 beta
/
pspad454inst_en.exe
/
{app}
/
Template
/
Singleton.cs
< prev
next >
Wrap
Text File
|
2008-01-09
|
567b
|
28 lines
using System;
using System.Collections.Generic;
using System.Text;
namespace GoogleRequester
{
public class Singleton
{
private static Singleton instance = null;
private static object lockObject = new object();
private Singleton()
{
}
public static Singleton GetInstance()
{
lock (lockObject)
{
if (instance == null)
instance = new Singleton();
return instance;
}
}
}
}